package com.jms.framework.beans.factory;

import com.jms.framework.beans.BeanDefinition;

public abstract class AbstractBeanFactory<T> implements ObjectFactory<T> {

    protected BeanDefinition beanDefinition;


    public AbstractBeanFactory(BeanDefinition beanDefinition) {
        this.beanDefinition = beanDefinition;
    }

    @Override
    public Class<?> getObjectType() throws Exception {
        String beanClassName = beanDefinition.getBeanClassName();
        if (beanClassName != null) {
            return Class.forName(beanClassName);
        }
        return null;
    }
}
